package com.gupaoedu.task.pattern.strategytask.schedule;

import com.gupaoedu.task.pattern.strategytask.schedule.scheduleport.ScheduleStrategy;
import com.gupaoedu.task.pattern.strategytask.schedule.scheduleport.Schedulement;
import com.gupaoedu.task.pattern.stratergy.pay.MsgResult;
import com.gupaoedu.task.pattern.stratergy.pay.payport.PayStrategy;
import com.gupaoedu.task.pattern.stratergy.pay.payport.Payment;

public class SchedulingClient {
    private String taskid;
    private Integer isVip;
    private Integer disflag;

    public SchedulingClient(String taskid, Integer isVip, Integer disflag) {
        this.taskid = taskid;
        this.isVip = isVip;
        this.disflag = disflag;
    }



    public ScheduleResult schduling(String schdulingtype) {
        Schedulement schedulement = ScheduleStrategy.get(schdulingtype);
        System.out.println("使用调度类型" + schedulement.getType());
        System.out.println("调度标识为：" + disflag + "，开始调度...");
        return schedulement.serverschduling(taskid,isVip,disflag);
    }
}
